<?php
	$hostname = "localhost";
   	$databaseName = "quangcaosanpham";
   	$user = "root";
   	$pass = "";
	
	if(!($connection = @mysql_connect($hostname, $user, $pass)))
	{
		die("Error: Cannot connect to database !!!");
	}    
    mysql_query("SET character_set_results=utf8");
    mysql_query("SET character_set_client=utf8");
    mysql_query("SET character_set_connection=utf8");
    mb_language('uni');
    mb_internal_encoding('UTF-8');
    	
	if (!(mysql_select_db($databaseName, $connection))) 
	{
		die("Error: Cannot select database name: $databaseName");
	}
    mysql_query("set names 'utf8'");
    
?>